package com.ruoyi.slope.ai.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.ai.mapper.SlopeAiModuleBindingMapper;
import com.ruoyi.slope.ai.domain.SlopeAiModuleBinding;
import com.ruoyi.slope.ai.service.ISlopeAiModuleBindingService;

/**
 * 模块绑定关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeAiModuleBindingServiceImpl implements ISlopeAiModuleBindingService 
{
    @Autowired
    private SlopeAiModuleBindingMapper slopeAiModuleBindingMapper;

    /**
     * 查询模块绑定关系
     * 
     * @param bindingId 模块绑定关系主键
     * @return 模块绑定关系
     */
    @Override
    public SlopeAiModuleBinding selectSlopeAiModuleBindingByBindingId(String bindingId)
    {
        return slopeAiModuleBindingMapper.selectSlopeAiModuleBindingByBindingId(bindingId);
    }

    /**
     * 查询模块绑定关系列表
     * 
     * @param slopeAiModuleBinding 模块绑定关系
     * @return 模块绑定关系
     */
    @Override
    public List<SlopeAiModuleBinding> selectSlopeAiModuleBindingList(SlopeAiModuleBinding slopeAiModuleBinding)
    {
        return slopeAiModuleBindingMapper.selectSlopeAiModuleBindingList(slopeAiModuleBinding);
    }

    /**
     * 新增模块绑定关系
     * 
     * @param slopeAiModuleBinding 模块绑定关系
     * @return 结果
     */
    @Override
    public int insertSlopeAiModuleBinding(SlopeAiModuleBinding slopeAiModuleBinding)
    {
        slopeAiModuleBinding.setCreateTime(DateUtils.getNowDate());
        return slopeAiModuleBindingMapper.insertSlopeAiModuleBinding(slopeAiModuleBinding);
    }

    /**
     * 修改模块绑定关系
     * 
     * @param slopeAiModuleBinding 模块绑定关系
     * @return 结果
     */
    @Override
    public int updateSlopeAiModuleBinding(SlopeAiModuleBinding slopeAiModuleBinding)
    {
        return slopeAiModuleBindingMapper.updateSlopeAiModuleBinding(slopeAiModuleBinding);
    }

    /**
     * 批量删除模块绑定关系
     * 
     * @param bindingIds 需要删除的模块绑定关系主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiModuleBindingByBindingIds(String[] bindingIds)
    {
        return slopeAiModuleBindingMapper.deleteSlopeAiModuleBindingByBindingIds(bindingIds);
    }

    /**
     * 删除模块绑定关系信息
     * 
     * @param bindingId 模块绑定关系主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiModuleBindingByBindingId(String bindingId)
    {
        return slopeAiModuleBindingMapper.deleteSlopeAiModuleBindingByBindingId(bindingId);
    }
}
